const mongoose = require('../db/mongodb')

const MajorSchema = new mongoose.Schema({
  // 专业名称
  majorName: {
    type: String,
    unique: true,
    required: true
  },
  // 院系名称
  departmentName: {
    type: String,
    required: true
  },
  // 排序
  sort: {
    type: Number,
    default: 0
  },
  // 创建时间
  createTime: {
    type: Date,
    default: Date.now
  },
  updateTime: {
    type: Date,
    default: Date.now
  }
})

module.exports = mongoose.model('Major', MajorSchema)
